<template>
  <div class="block-div3">
    我是A组件(接收方)
    <p> 接收的消息:{{msg}}</p>

  </div>
</template>
<script>
import BaseProgress from "@/components/scoped/BaseProgress.vue";
import Bus from "@/utils/EvenBus";
export default {
  name: "BaseA",
  components: {BaseProgress},
  data(){
    return{
      msg: ''
    }

  },
  created() {
// 监听Bus消息总线(订阅消息)
    Bus.$on('sendMsg',(msg) => {
      console.log(msg)
      this.msg = msg
    })

  }
}
</script>


<style scoped>
.block-div3 {
  height: 200px;
  width: 200px;
  border-radius: 10px; /* 设置圆角 */
  padding: 10px; /* 内边距为10px */
  margin: 5px;
  border: 1px solid #eeeeee; /* 1px的边框 */
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3); /* 添加阴影 */

}
</style>
